
import { PrimaryGeneratedColumn, Entity, Column, ManyToMany } from "typeorm";
import { User } from "./User.dao";

@Entity()
export class Hobby {

    @PrimaryGeneratedColumn({
        comment: "id"
    })
    id: number

    @Column({
        comment: "兴趣爱好"
    })
    desc: string

    @ManyToMany(() => User, user => user.hobbies)
    users: User[]

}